home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3n / xdr_create.z / xdr_create
Encoding:
Text File  |  2002-10-03  |  9.1 KB  |  133 lines

  1.  
  2.  
  3.  
  4. xxxxddddrrrr____ccccrrrreeeeaaaatttteeee((((3333NNNN))))                                                  xxxxddddrrrr____ccccrrrreeeeaaaatttteeee((((3333NNNN))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _xxxx_dddd_rrrr______cccc_rrrr_eeee_aaaa_tttt_eeee:   _xxxx_dddd_rrrr______dddd_eeee_ssss_tttt_rrrr_oooo_yyyy, _xxxx_dddd_rrrr_mmmm_eeee_mmmm______cccc_rrrr_eeee_aaaa_tttt_eeee, _xxxx_dddd_rrrr_rrrr_eeee_cccc______cccc_rrrr_eeee_aaaa_tttt_eeee, _xxxx_dddd_rrrr_ssss_tttt_dddd_iiii_oooo______cccc_rrrr_eeee_aaaa_tttt_eeee
  10.      - library routines for external data representation stream creation
  11.  
  12. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  13.      XDR library routines allow C programmers to describe arbitrary data
  14.      structures in a machine-independent fashion.  Protocols such as remote
  15.      procedure calls (RPC) use these routines to describe the format of the
  16.      data.
  17.  
  18.      These routines deal with the creation of XDR streams.  XDR streams have
  19.      to be created before any data can be translated into XDR format.
  20.  
  21.    RRRRoooouuuuttttiiiinnnneeeessss
  22.      See _rrrr_pppp_cccc(3N) for the definition of the _XXXX_DDDD_RRRR, _CCCC_LLLL_IIII_EEEE_NNNN_TTTT, and _SSSS_VVVV_CCCC_XXXX_PPPP_RRRR_TTTT data
  23.      structures.
  24.  
  25.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_rrrr_pppp_cccc_////_xxxx_dddd_rrrr_...._hhhh_>>>>
  26.  
  27.      _vvvv_oooo_iiii_dddd
  28.      _xxxx_dddd_rrrr______dddd_eeee_ssss_tttt_rrrr_oooo_yyyy_((((_XXXX_DDDD_RRRR _****_xxxx_dddd_rrrr_ssss_))))_;;;;
  29.  
  30.           A macro that invokes the destroy routine associated with the XDR
  31.           stream, _x_d_r_s.  Destruction usually involves freeing private data
  32.           structures associated with the stream.  Using _x_d_r_s after invoking
  33.           _xxxx_dddd_rrrr______dddd_eeee_ssss_tttt_rrrr_oooo_yyyy is undefined.
  34.  
  35.      _vvvv_oooo_iiii_dddd
  36.      _xxxx_dddd_rrrr_mmmm_eeee_mmmm______cccc_rrrr_eeee_aaaa_tttt_eeee_((((_XXXX_DDDD_RRRR _****_xxxx_dddd_rrrr_ssss_,,,, _cccc_oooo_nnnn_ssss_tttt _cccc_aaaa_dddd_dddd_rrrr______tttt _aaaa_dddd_dddd_rrrr_,,,,
  37.           _cccc_oooo_nnnn_ssss_tttt _uuuu______iiii_nnnn_tttt _ssss_iiii_zzzz_eeee_,,,, _cccc_oooo_nnnn_ssss_tttt _eeee_nnnn_uuuu_mmmm _xxxx_dddd_rrrr______oooo_pppp _oooo_pppp_))))_;;;;
  38.  
  39.           This routine initializes the XDR stream object pointed to by _x_d_r_s.
  40.           The stream's data is written to, or read from, a chunk of memory at
  41.           location _a_d_d_r whose length is no more than _s_i_z_e bytes long.  The _o_p
  42.           determines the direction of the XDR stream (either _XXXX_DDDD_RRRR______EEEE_NNNN_CCCC_OOOO_DDDD_EEEE,
  43.           _XXXX_DDDD_RRRR______DDDD_EEEE_CCCC_OOOO_DDDD_EEEE, or _XXXX_DDDD_RRRR______FFFF_RRRR_EEEE_EEEE).
  44.  
  45.      _vvvv_oooo_iiii_dddd
  46.      _xxxx_dddd_rrrr_rrrr_eeee_cccc______cccc_rrrr_eeee_aaaa_tttt_eeee_((((_XXXX_DDDD_RRRR _****_xxxx_dddd_rrrr_ssss_,,,, _cccc_oooo_nnnn_ssss_tttt _uuuu______iiii_nnnn_tttt _ssss_eeee_nnnn_dddd_ssss_zzzz_,,,,
  47.           _cccc_oooo_nnnn_ssss_tttt _uuuu______iiii_nnnn_tttt _rrrr_eeee_cccc_vvvv_ssss_zzzz_,,,, _cccc_oooo_nnnn_ssss_tttt _cccc_aaaa_dddd_dddd_rrrr______tttt _hhhh_aaaa_nnnn_dddd_llll_eeee_,,,,
  48.           _cccc_oooo_nnnn_ssss_tttt _iiii_nnnn_tttt _((((_****_rrrr_eeee_aaaa_dddd_iiii_tttt_))))_((((_cccc_oooo_nnnn_ssss_tttt _vvvv_oooo_iiii_dddd _****_,,,, _cccc_hhhh_aaaa_rrrr _****_,,,, _cccc_oooo_nnnn_ssss_tttt _iiii_nnnn_tttt_))))_,,,,
  49.           _cccc_oooo_nnnn_ssss_tttt _iiii_nnnn_tttt _((((_****_wwww_rrrr_iiii_tttt_eeee_iiii_tttt_))))_((((_cccc_oooo_nnnn_ssss_tttt _vvvv_oooo_iiii_dddd _****_,,,, _cccc_oooo_nnnn_ssss_tttt _cccc_hhhh_aaaa_rrrr _****_,,,, _cccc_oooo_nnnn_ssss_tttt _iiii_nnnn_tttt_))))_))))_;;;;
  50.  
  51.           This routine initializes the XDR stream object pointed to by _x_d_r_s.
  52.           The stream's data is written to a buffer of size _s_e_n_d_s_z; a value of
  53.           _0000 indicates the system should use a suitable default.  The stream's
  54.           data is read from a buffer of size _r_e_c_v_s_z; it too can be set to a
  55.           suitable default by passing a _0000 value.  When a stream's output
  56.           buffer is full, _w_r_i_t_e_i_t is called.  Similarly, when a stream's input
  57.           buffer is empty, _r_e_a_d_i_t is called.  The behavior of these two
  58.           routines is similar to the system calls _rrrr_eeee_aaaa_dddd and _wwww_rrrr_iiii_tttt_eeee [see _rrrr_eeee_aaaa_dddd(2)
  59.           and _wwww_rrrr_iiii_tttt_eeee(2), respectively], except that _h_a_n_d_l_e (_CCCC_LLLL_IIII_EEEE_NNNN_TTTT, or _SSSS_VVVV_CCCC_XXXX_PPPP_RRRR_TTTT)
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. xxxxddddrrrr____ccccrrrreeeeaaaatttteeee((((3333NNNN))))                                                  xxxxddddrrrr____ccccrrrreeeeaaaatttteeee((((3333NNNN))))
  71.  
  72.  
  73.  
  74.           is passed to the former routines as the first parameter instead of a
  75.           file descriptor.  Note:  the XDR stream's _o_p field must be set by
  76.           the caller.
  77.  
  78.           Note:  this XDR stream implements an intermediate record stream.
  79.           Therefore there are additional bytes in the stream to provide record
  80.           boundary information.
  81.  
  82.      _vvvv_oooo_iiii_dddd
  83.      _xxxx_dddd_rrrr_ssss_tttt_dddd_iiii_oooo______cccc_rrrr_eeee_aaaa_tttt_eeee_((((_XXXX_DDDD_RRRR _****_xxxx_dddd_rrrr_ssss_,,,, _FFFF_IIII_LLLL_EEEE _****_ffff_iiii_llll_eeee_,,,, _cccc_oooo_nnnn_ssss_tttt _eeee_nnnn_uuuu_mmmm _xxxx_dddd_rrrr______oooo_pppp _oooo_pppp_))))_;;;;
  84.  
  85.           This routine initializes the XDR stream object pointed to by _x_d_r_s.
  86.           The XDR stream data is written to, or read from, the standard I/O
  87.           stream _f_i_l_e.  The parameter _o_p determines the direction of the XDR
  88.           stream (either _XXXX_DDDD_RRRR______EEEE_NNNN_CCCC_OOOO_DDDD_EEEE, _XXXX_DDDD_RRRR______DDDD_EEEE_CCCC_OOOO_DDDD_EEEE, or _XXXX_DDDD_RRRR______FFFF_RRRR_EEEE_EEEE).
  89.  
  90.           Note:  the destroy routine associated with such XDR streams calls
  91.           _ffff_ffff_llll_uuuu_ssss_hhhh on the _f_i_l_e stream, but never _ffff_cccc_llll_oooo_ssss_eeee [see _ffff_cccc_llll_oooo_ssss_eeee(3S)].
  92.  
  93. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  94.      _ffff_cccc_llll_oooo_ssss_eeee(3S), _rrrr_eeee_aaaa_dddd(2), _rrrr_pppp_cccc(3N), _wwww_rrrr_iiii_tttt_eeee(2), _xxxx_dddd_rrrr______aaaa_dddd_mmmm_iiii_nnnn(3N), _xxxx_dddd_rrrr______cccc_oooo_mmmm_pppp_llll_eeee_xxxx(3N),
  95.      _xxxx_dddd_rrrr______ssss_iiii_mmmm_pppp_llll_eeee(3N)
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.